import request from '@/router/axios';

const BASEURL = "/system/datasource"

// 导出
export const exports = () => {
    return BASEURL + '/export'
}

//列表
export const list = (params) => {
    return request({
        url: BASEURL,
        method: 'get',
        params: {
            ...params
        }
    })
}

//分页
export const pageList = (current, size, params) => {
    return request({
        url: BASEURL + '/page',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    })
}

// 删除
export const del = (ids) => {
    return request({
        url: BASEURL,
        method: 'delete',
        params: {
            ids
        }
    })
}
// 修改
export const update = (data) => {
    return request({
        url: BASEURL,
        method: 'put',
        data: data
    })
}
// 新增
export const save = (data) => {
    return request({
        url: BASEURL,
        method: 'post',
        data: data
    })
}
// 查询详细
export const query = (id) => {
    return request({
        url: BASEURL + "/query",
        method: 'get',
        params: {
            id: id
        }
    })
}

